﻿<%@ WebHandler Language="C#" Class="Handler" %>

using System;
using System.Web;
using System.Data.SqlClient;
using System.Web.SessionState;
using System.Data;
using System.Text;

public class Handler : IHttpHandler {

    public void ProcessRequest (HttpContext context) {
        context.Response.ContentType = "text/plain";
        string xm = context.Request["xm"];
        string sj = context.Request["sj"];
        string sql = "insert 表单 values (@xm,@sj)";
        SqlParameter[] ps =
            {
                new SqlParameter("@xm",xm),
                new SqlParameter("@sj",sj)
            };
        int res = sqlhelper.ExecuteNonQuery(sql, ps);
        if (res > 0)
        {
            context.Response.Write("ture");
        }
        else
        {
                context.Response.Write("false");
        }
    }

    public bool IsReusable {
        get {
            return false;
        }
    }

}